package com.clubs.coding.Controller;

import com.clubs.coding.Service.AthAdminCheckService;
import com.clubs.coding.Service.NewsService;
import com.clubs.coding.common.ApiRestResponse;
import com.clubs.coding.common.Constant;
import com.clubs.coding.exception.ImoocMallException;
import com.clubs.coding.exception.ImoocMallExceptionEnum;
import com.clubs.coding.model.request.NewsReq;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.UUID;

@Controller
@ResponseBody

@RequestMapping("/admin/newuser")
public class AthCheckAdminController {
    @Autowired
    AthAdminCheckService athAdminCheckService;
    @PostMapping("/list")
    public ApiRestResponse checklist(Integer pageNum,Integer pageSize,Integer type){

        PageInfo checklist = athAdminCheckService.checklist(pageNum, pageSize,type);
        return ApiRestResponse.success(checklist);
    }
    @GetMapping("/checklistAll")
    public ApiRestResponse checklistAll(Integer pageNum,Integer pageSize){

        PageInfo checklist = athAdminCheckService.checklistAll(pageNum, pageSize);
        return ApiRestResponse.success(checklist);
    }
    //审核
    @PostMapping("/runcheck")
    public ApiRestResponse runcheck(Integer id){
        athAdminCheckService.runcheck(id);
        return ApiRestResponse.success("审核通过");
    }
}
